home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / TSQLPC10.ZIP / SENDFILE.LIS next >
File List  |  1989-10-02  |  21KB  |  440 lines

  1.                            - 1 -
  2. 25-Apr-88 sendfile_doc, sendfile.lis
  3. Document updated 25-Feb-89, 2-Aug-89
  4.  
  5. Professor Timo Salmi
  6. School of Business Studies
  7. University of Vaasa
  8. P.O. Box 297
  9. SF-65101 Vaasa
  10. Finland
  11.  
  12.  
  13. SINCLAIR QL <--> PC FILE TRANSFER
  14. =================================
  15.  
  16.    Even if this SENDFILE documentation describes file transfers
  17. between the ill-fated  Sinclair  QL  and  a  PC,  much  of  the
  18. information should be of general interest when considering file
  19. transfers between any home computer and a PC.
  20.    For Sinclair  QL  users  this  file  also  contains  a  list
  21. covering a number of my other QL programs starting from page 5.
  22. If you want  to obtain  programs from  the list,  please direct
  23. these requests to the Quanta librarians, not me.
  24.  
  25.    Two  programs  belong  to   this   set,   SENDFILE_EXE   and
  26. TAKEFILE_EXE, together with this document in SENDFILE_DOC.
  27.  
  28.    The author  shall not be liable to  the user for any direct,
  29. indirect   or  consequential  loss  arising  from  the  use  or
  30. inability  to use of any program  or file howsoever caused. The
  31. (nominal) fee  for  the  QL  programs  does  not  include  user
  32. support.
  33.  
  34.    Comments of and contacts with  fellow  Sinclair  QL  and  PC
  35. users  are welcome and encouraged. If  you have the access, you
  36. can try to contact me e.g. at FidoNet node 515/1 (Micro Maniacs
  37. Opus, To: Timo Salmi), or at Internet address:
  38.  ts@chyde.uwasa.fi     (the preferred address)
  39. Bitnet address:
  40.  SALMI@FINFUN.BITNET 
  41.  
  42.  
  43. Short Descriptions
  44.  
  45. SENDFILE_EXE
  46. Sends ascii files from QL ser2_ port to PC. Works with Procomm,
  47. MsKermit,  and Telix  well up  to 9600  bauds. Has  proven very
  48. reliable when you get the PC settings right. Use ascii download
  49. in the PC  end  of  things.  Includes  optional  conversion  of
  50. Scandinavian characters å ä ö Å Ä Ö into å ä ö Å Ä Ö. 
  51.  
  52. TAKEFILE_EXE
  53. Takes ascii files sent  to ser2_  port from  a PC.  Works  with
  54. Procomm, MsKermit, and Telix, if their settings are right. Baud
  55. rate 300 recommended.  Not  entrely  reliable  because  of  the
  56. technical inadequacy of QL ports. PC optional translation of PC
  57. åäöÅÄÖ into  corresponding QL characters.
  58.  
  59.                            - 2 - 
  60.  
  61. How it Started
  62.  
  63.    The following  letter, which  I sent  to Quanta  in February
  64. 1988, gives the background of SENDFILE_EXE and TAKEFILE_EXE. (I
  65. never  heard about the letter or my catridge after I sent it to
  66. the former Quanta officials.)
  67.  
  68.    "Finally having had time  for it,  I have  tried my  hand at
  69. transferring data  between Sinclair QL and  a Zenith laptop PC.
  70. Contrary to my fears it turned out easier than expected.
  71.    The physical connection was made between ser2 serial port of
  72. the  QL and COM1 serial port of Zenith. (Don't ask me about the
  73. pins.) To  receive  normal  ascii  files  (not  much  sense  in
  74. transferring  executable QL files to a PC) I used Procomm ascii
  75. downloading. Having  set Zenith  up I  then tried  sending data
  76. from the  QL with QCODE (v4.1)  terminal emulation program, but
  77. the transfer was painstakingly slow, and lost the linefeeds and
  78. Scandinavian characters on the  way.  I  then  tried  the  copy
  79. commands suggested in  Quanta, but got  stuck in the  PC end of
  80. things.
  81.    This was no good.  Next  I  wrote  a  simple  Turbo  Charged
  82. SuperBASIC program,  which writes the source  file to ser2 port
  83. adding  the   linefeeds   and   converting   the   Scandinavian
  84. characters. This transfer  works  quite  well  at  9600  bauds.
  85. Success. Perhaps not the most elegant solution, but it works.
  86.    Transfer in the  other  direction  has  not  been  quite  as
  87. successful (nor as necessary), but manageable, nevertheless. At
  88. 1200 bauds  I first set  up a logfile  in the QL  end of things
  89. using QCODE, and  the  applied  Procomm  and  ascii  upload  in
  90. Zenith. This works reasonably. The scandinavian characters must
  91. be converted, though, prior sending.
  92.    I also  attempted writing  a program  for the  QL to  do the
  93. receiving  (reading from  ser2), but  contrary to  sending this
  94. method  turned out to be error-prone. The programs halts sooner
  95. or later to an XMIT error in reading the QL port. Not much harm
  96. done though,  since in PC to QL  transfer QCODE is fast enough,
  97. even if not so in the opposite direction."
  98.  
  99. ... EOL (end of letter) to Quanta ...
  100.  
  101.    After  that  letter  I  have  (hopefully)  solved  the  file
  102. transfer problem  in  BOTH  directions,  and  the  results  are
  103. sendfile_exe and takefile_exe.
  104.                            - 3 -
  105.  
  106. SENDFILE_EXE
  107.  
  108.    Transfer  from QL to PC seems to be quite easy and free from
  109. trouble after you get your system once (con)figured out.
  110.    To  begin with,  connect your  QL ser2_  port with  a proper
  111. cable to the RS232 port  of  your  PC.  Personally,  I  have  a
  112. Miracle  Systems Modaptor in between my QL and PC, but this may
  113. not  be necessary. As to acquiring  or making the proper cable,
  114. you'll  have to consult your dealer,  or at least your manuals.
  115. The most common  pin connections are  given at the  end of this
  116. chapter.
  117.    Call Procomm communications program (or similar) in your PC.
  118. Next set Procomm baud rate at  the  rate  you  intend  to  use.
  119. Usually  the setting 9600,N,8,1 will work,  but you may have to
  120. experiment depending on  your PC.  It is  advisable to  set the
  121. Procomm  software flow control (XON/XOFF) on, and hardware flow
  122. control off.
  123.    Next, invoke ASCII download in Procomm.
  124.    On  your QL apply EXEC_W SENDFILE_EXE. The program will then
  125. ask  you for the file to be sent, the baud rate (make sure that
  126. the same baud  rates  are  used),  and  whether  you  want  the
  127. Scandinavian characters translated.
  128.    The  transfer should now  get under way.  If everything goes
  129. right, the characters sent  are echoed  both on  the QL  and PC
  130. screens. When  the entire  contents of  the file  have emerged,
  131. press ESC on Procomm to close the file on the PC.
  132.    Scandinavian characters pose  a problem  for us  poor Finns,
  133. since  they are in the 8-bit half on the QL and PC ascii codes,
  134. and what is more, not  even  the  same  for  QDOS  and  MS-DOS.
  135. Therefore  å ä ö Å Ä and Ö are translated into å ä ö Å Ä Ö when
  136. the translation option is  chosen.  If  you  have  to  use  the
  137. Scandinavian  conversion, use Procomm translation table (ALT W)
  138. to convert the latter back into PC Scandinavian characters. The
  139. relevant translations  are  91:142,  92:153,  93:143,  123:132,
  140. 124:148, 125:134.
  141.    Two connection diagrams, courtesy of Mr. Antti Ala-Keturi of
  142. the Vaasa University Computer Centre, are given below:
  143.  
  144.    QL ser2_ 6 pins           PC COM1 25 pins
  145.          1 ----------------------- 7
  146.          2 ----------------------- 3
  147.          3 ----------------------- 2
  148.  
  149.    QL ser2_ 6 pins           PC AT COM1 9 pins
  150.          1 ----------------------- 5
  151.          2 ----------------------- 2
  152.          3 ----------------------- 3
  153.                            - 4 -
  154.  
  155. TAKEFILE_EXE
  156.  
  157.    Transferring data to QL seems  to  be  more  difficult.  The
  158. maximum baud rate which  works is  300 bauds,  and you  have to
  159. pace sending the characters. Proceed as follows.
  160.    Set Procomm  baud  rate  at  300,N,8,1  and  set  "character
  161. pacing" delay to 100 ms in "ascii transfer options".
  162.    Call  EXEX_W TAKEFILE_EXE and give the file name, baud rate,
  163. and whether you want the Scandinavian characters translated. If
  164. the program aborts at this stage (it sometimes will) in an XMIT
  165. error, just call it again.
  166.    On  your PC invoke Procomm upload  option, and use the ascii
  167. upload. If takefile_exe aborts  again,  terminate  the  Procomm
  168. upload  by pressing ESC on the  PC. Call takefile_exe again and
  169. let  it clear the rubbish  from the port, and  then use it once
  170. again. Usually, at least at this stage the system will work (if
  171. not earlier), and you can invoke Procomm upload again.
  172.    The  file is  echoed to  the QL  screen. On  the QL  you can
  173. terminate the  transfer at any  time by pressing  TAB. When the
  174. transfer is  complete, press CTRL Z on  the PC to terminate the
  175. transferred file. Sounds complicated, but it does work.
  176.    Notice, that  if you  terminate the  transfer with  with the
  177. TAB,  there will be some rubbish in  the buffer at the start of
  178. the next  transfer, so it is advisable  to perform a dummy call
  179. of  TAKEFILE_EXE before the next actual transfer. This is easy,
  180. since there is an "again" option in the program.
  181.    In the PC  -->  QL  transfer  the  Scandinavian  translation
  182. should  work without the need  of considering further settings.
  183. (If you  want to delve into  the translation problems, filedump
  184. programs, such  as QL FILEDUMP_EXE and  PC FILEDUMP.EXE, by the
  185. author, may become handy.)
  186.                            - 5 -
  187.  
  188. Other Library Programs by the Author
  189.  
  190. 23/04/1988 21:17:00
  191.  
  192.     CASER_EXE            UTILITY        QUANTA LIB_59 DISK_16
  193. Caser  converts names of files into  upper or lower case. Caser
  194. requires a toolkit with a RENAME command, such as Tony Tebby's.
  195. Files  are selected directly  from a directory  menu. Caser can
  196. also be used for selective deleting of files. Can use ramdisk.
  197.  
  198.     CONDENSE_EXE         UTILITY        QUANTA LIB_35 DISK_12
  199. A  utility to condense SuperBASIC  programs. It removes REMarks
  200. and  deletes REMark-lines  as well  as lines  with a  colon (:)
  201. only.   Furthermore  it  removes  indentations.  The  resultant
  202. program  will be more concise, which is particularly useful for
  203. SUPERCHARGE!
  204.  
  205.     COPIER_EXE           UTILITY        QUANTA LIB_36 DISK_12 
  206. Organized, interactive copying  from  one  device  to  another.
  207. Contains  several  options  including  ALL  FILES,  NEW  FILES,
  208. UPDATE, AUTOMATIC and SELECTIVE. Files can be copied or moved.
  209.  
  210.     CRYPTER_EXE          UTILITY        QUANTA DISK_16
  211. For protecting sensitive files  by  rewriting  them  in  secret
  212. code.  User chooses a  password. Same password  both crypts and
  213. decrypts the files. Instructions within the program.
  214.  
  215.     DIFFE_EXE            UTILITY        QUANTA_LIBRARY
  216. Compares the  contents of two files  and finds the differences.
  217. Includes fast  mode and more tolerant  slow mode. Needs Digital
  218. Precision's Turbo  runtime toolkit  RUNTIME_EXTS or  the actual
  219. toolkit.
  220.  
  221.     DRAWLINE             GRAPHICS       QUANTA LIB_59 DISK_16
  222. A SuperBASIC program for drawing lines of two variables on grid
  223. drawn  by the program. For a  demonstration of the program, and
  224. the graphical presentation of  a  linear  programming  problem,
  225. merge    DRAWLINE_DEMO   and   follow   the   instructions   in
  226. DRAWLINE_DOC.
  227.  
  228.     EOLN_EXE             UTILITY        QUANTA LIB_60 DISK_16
  229. Lets  you change the end of marker of a file. Choices are <LF>,
  230. <CR>, and  <LF><CR>. Creates  a new  file leaving  the original
  231. unchanged.  Useful e.g. for certain printers and PASCAL program
  232. development.
  233.                            - 6 -
  234.  
  235.     FACTORS_EXE          MATH           QUANTA LIB_01 DISK_05
  236. Finds  the factors of an integer. Calculates the largest common
  237. divisor, and the smallest common dividend of two integers.
  238.  
  239.     FILEADD_EXE          UTILITY        QUANTA DISK_16
  240. Concatenates  two text-files. That is, adds  to the end of each
  241. row of the first file the corresponding row of the second file.
  242. Blanks can be inserted in between. The most obvious application
  243. is making two-column texts. Also see FILETRIM and FILECUT.
  244.  
  245.     FILECUT_EXE          UTILITY        QUANTA LIB_05 DISK_06
  246. Can  be used to divide large text (not _doc) files into smaller
  247. modules.  Useful e.g. prior transmission in nets. Drops traling
  248. blanks and  special  characters,  and  optionally  omits  blank
  249. lines.
  250.  
  251.     FILEDUMP_EXE         UTILITY        QUANTA LIB_35 DISK_12
  252. Dumps  the contents of a file on screen in ASCII characters and
  253. ASCII  code numbers simultaneously. Prints ASCII 10 (line feed)
  254. in  colour to highlight the lines of  files. A count is kept at
  255. the same time.
  256.  
  257.     FILETRIM_EXE         UTILITY        QUANTA AMON DISK_05
  258. For  extracting an optional  range of columns  from a textfile,
  259. optionally  adding a left margin. As  chosen, trims or pads the
  260. right end of each row of a file.
  261.  
  262.     FIND_EXE             UTILITY        QUANTA DISK_16
  263. Finds a given string from any type of file. Gives the number of
  264. the block  where the string  is found. Useful  as a preliminary
  265. prior  using e.g. Cartridge Doctor patch.  Not very fast. For a
  266. fast, but a less tolerant multifile search use SEARCH_EXE.
  267.  
  268.     FLAGS_EXE            GAMES/EDUC     QUANTA LIB_36 DISK_12
  269. An  educational game where you are shown national flags and you
  270. have to identify each in turn from a multiple choice list.
  271.  
  272.     F_FORM               FUNCTION       QUANTA LIB_35 DISK_12
  273. For formatting output. Resembles the missing print using.
  274.  
  275.     F_USING              FUNCTION       QUANTA LIB_26 DISK_09
  276. A function providing the missing PRINT USING to SuperBASIC. Use
  277. e.g.  statement 110 PRINT F_USING$ ("#####.##", a) to print the
  278. value of the real variable  a  with  two  decimal  places.  See
  279. USING_DOC for more information.
  280.                            - 7 -
  281.  
  282.     HEXAGAME_EXE         GAMES          QUANTA LIB_57 DISK_02
  283. An  educational version  of the  old number-guessing  game. You
  284. have  to find the  hidden hexadecimal (16-base)  number with as
  285. little  guesses and as  fast as you  can. The game  can also be
  286. played in binary, octal, or the easy decimal (10-base).
  287.  
  288.     JSFORMAT             UTILITY        QUANTA LIB_59 DISK_16
  289. Formatting problem  cartridges with  automatic RETRY  on format
  290. failed. Works on JS and MGY  versions  of  the  QL.  Uses  WHEN
  291. ERRor. Can also be used on  AH  and  JH  versions  with  manual
  292. RETRY.
  293.  
  294.     LINEGAME_EXE         GAMES          QUANTA LIB_53 DISK_15
  295. You  have to fit  a line (y=a+kx)  to hit a  number of circles.
  296. Each circle  has a score value inverse  to its size. The player
  297. has three lines  to fit  and the  possibility of  gaining bonus
  298. lines.
  299.  
  300.     LINPREP_EXE          MATH           QUANTA LIB_35
  301. The  preparation code for solving linear programming and linear
  302. goal    programming   problems.   Documented   in   detail   in
  303. LINSOLVE_DOC. Associated program LINSOLVE_EXE.
  304.  
  305.     LINSOLVE_EXE         MATH           QUANTA LIB_35 DISK_12
  306. A   solution  code  for  linear  programming  and  linear  goal
  307. programming problems. Documented  in  detail  in  LINSOLVE_DOC.
  308. Associated program LINPREP_EXE.
  309.  
  310.     LINSOLVE_DOC         MATH/QUILL     QUANTA LIB_35
  311. Quill documentation of the LINSOLVE solutions system for linear
  312. programming  and linear  goal programming  problems. Associated
  313. programs LINPREP_EXE and LINSOLVE_EXE.
  314.  
  315.     MAKEXE_EXE           UTILITY        QUANTA_LIBRARY
  316. Converts a normal  file into  an executable  file. Can  also be
  317. used to  alter the  dataspace of  an executable  file. Requires
  318. Digital  Precision's RUNTIME_EXTS. See Quanta  5/1987 p. 10 for
  319. the  need of conversions because of  a bug in Micro Peripherals
  320. disk drive.
  321.  
  322.     MANAGAME_EXE         GAMES/EDUC     QUANTA LIB_36 DISK_12
  323. A management game for one person. Besides being "one more game"
  324. it  serves   as  a   serious  introduction   into  full-fledged
  325. management games used in teaching business students.
  326.                            - 8 -
  327.  
  328.     PAIVAYS_EXE          CLOCK          QUANTA LIB_01 DISK_05
  329. Multitasking clock giving  the date  in Finnish.  Needs Tebby's
  330. toolkit (sets priority to 1). Run with EXEC (not EXEC_W). There
  331. is also a near version PAIVAYS2_EXE.
  332.  
  333.     RCOPY                UTILITY        QUANTA AMON DISK_05
  334. RCOPY   copy   command   takes   three   parameters:   source%,
  335. destination%  and filename$. 1=mdv1_, 2=mdv2, 3=fdk1_, 4=fdk2_,
  336. 0=scr_. Source = destination allowed,  which  is  handy  for  a
  337. single  diskdrive. Needs CST  ram_bin code. LRUN  RCOPY to load
  338. RCOPY.
  339.  
  340.     RENUMBER_EXE         UTILITY        QUANTA LIB_60 DISK_16
  341. Renumbers  SuperBASIC files  without the  need of  loading them
  342. into memory. Convenient for program development.
  343.  
  344.     SEARCH_EXE           UTILITY        QUANTA LIB_60 DISK_16
  345. Searches  for a string through files.  Wildcards can be used to
  346. select the files to be searched for the string.
  347.  
  348.     SPELLED_EXE          UTILITY        QL_WORLD 
  349. An editor for entering and removing words from dictionaries for
  350. the spelling  checker SPELLER_EXE. Requires  a memory expansion
  351. of 512K.
  352.  
  353.     SPELLER_EXE          UTILITY        QL_WORLD (`3)
  354. Spelling   checker  for  listed  Quill  and  other  text-files.
  355. Requires a memory expansion  of  512K.  Dictionary  held  in  a
  356. separate  _dny file. Dictionary can be edited with SPELLED_EXE.
  357. A specialized dictionary SPELLED_DNY accompanies the program.
  358.  
  359.     STATAURU_EXE         STAT           QUANTA LIB_STATPREP
  360. Part of Timo  Salmi's  statistical  package.  Calculates  auto-
  361. correlations  up  to  desired   lag.   Also   calculates   runs
  362. statistics.
  363.  
  364.     STATDIAG_EXE         STAT           QUANTA LIB_STATPREP
  365. Part   of  Timo  Salmi's  statistical  package.  Draws  scatter
  366. diagrams  of the observations.  User can select  the X-axis and
  367. the Y-axis. If user  provides  the  regression  estimates,  the
  368. program also plots residuals and regressed values on request.
  369.  
  370.     STATMEAS_EXE         STAT           QUANTA LIB_STATPREP
  371. Part  of Timo Salmi's statistical package. Standard statistical
  372. measures  and frequency diagram for any of the variables in the
  373. data. Measures include minimum, maximum, mean, median, standard
  374. deviation, variance and kurtosis. See also STATPREP_DOC.
  375.                            - 9 -
  376.  
  377.    STATPREP_EXE          STAT     QUANTA LIB_STATPREP DISK_13
  378. Part  of Timo Salmi's statistical package.  An editor of a kind
  379. used for entering  the  data  for  the  associated  statistical
  380. programs. Maximum  10 variables  with 200  observations (each).
  381. See STATPREP_DOC for further information on the package.
  382.  
  383.     STATPREP_DOC         STAT/QUILL     QUANTA LIB_STATPREP
  384. Quill   documentation  of  Timo  Salmi's  statistical  package.
  385. Associated  programs STATPREP_EXE,  STATTRAN_EXE, STATMEAS_EXE,
  386. STATRCOR_EXE,  STATAURU_EXE, STATREGR_EXE, STATDIAG_EXE and the
  387. menu driver STATMENU.
  388.  
  389.     STATRCOR_EXE         STAT           QUANTA LIB_STATPREP
  390. Part  of Timo Salmi's statistical  package. Calculates both the
  391. usual   (Pearson's)   correlation    coefficients    and    the
  392. (non-parametric) Spearman's rank correlation coefficients. Also
  393. gives ranks for the observations of any of the variables.
  394.  
  395.     STATREGR_EXE         STAT           QUANTA LIB_STATPREP
  396. Part   of  Timo   Salmi's  statistical   package.  Multivariate
  397. regression  on   the  data  prepared   with  STATPREP_EXE  (and
  398. STATTRAN_EXE).
  399.  
  400.     STATTRAN_EXE         STAT           QUANTA LIB_STATPREP
  401. Part of Timo  Salmi's  statistical  package.  Used  for  making
  402. transformations on  observations  prepared  with  STATPREP_EXE.
  403. Transformations  include taking  logarithms, raising  to power,
  404. taking roots, scaling, and multiplying between observations.
  405.  
  406.     TRANSLATE_EXE        UTILITY        QUANTA LIB_05 DISK_06
  407. Translates the non-scandinavian characters  åäöÅÄÖ  of  a  text
  408. file into their scandinavian counterparts  åäöÅÄÖ.
  409.  
  410. TURBOCOPY_EXE            UTILITY        NOT YET IN
  411. Selective  fast copying. Can copy within a single device, which
  412. is  very useful  for single  diskdrive systems.  Loads programs
  413. into memory, and downdoads  then  onto  destination.  Selective
  414. delete incorporated. Caution required because of QDOS bugs.
  415.  
  416.     TURBODENSE_EXE       UTILITY        QUANTA LIB_26 DISK_09
  417. Another utility to condense  SuperBASIC  programs.  Works  like
  418. CONDENSE_EXE  but is about three times faster. Furthermore does
  419. not delete REMark + and REMark -, which indicate threaded code.
  420.  
  421.     TYPEVADERS_EXE       GAMES          QUANTA AMON DISK_05
  422. Prevent the  invading characters  from reaching  the right-hand
  423. side  of the screen by typing them. Makes you familiar with the
  424. QL keyboard and fast typing.
  425.                            - 10 -
  426.  
  427.     TYPE_EXE             UTILITY        QUANTA LIB DISK_15
  428. Displays  file(s)  on   screen.  Wildcards   can  be   used  in
  429. file-names.
  430.  
  431.     WITPIN_EXE           GAMES          QUANTA LIB_36 DISK_12
  432. A game  of wit where you have to  remove pins from the board by
  433. moving a pin over an adjacent pin.
  434.  
  435.     WORDLIST_EXE         UTILITY        QUANTA LIB_36 DISK_12
  436. List the words from  any  text-file.  Option  for  alphabetical
  437. order. Useful  for checking the  spelling of a  Quill file. For
  438. bigger files there is a BIGWORDLIST_EXE program available.
  439.  
  440.